import { request } from "@/utils/request"
const prefix = '/regular'

/**
 * 获取固定车位
 * @returns 
 */
export const getRegularRequest = () => {
	return request.get(`${prefix}/getRegular`)
}

/**
 * 删除固定车位
 * @param id 
 * @returns 
 */
export const deleteRegularRequest = (id: number) => {
	return request.delete(`${prefix}/deleteRegular/${id}`)
}

interface regularParams {
	id: number
	pid: number
	uid: number
}
/**
 * 修改固定车位
 * @param params 
 * @returns 
 */
export const reviseRegularRequest = (params: regularParams) => {
	return request.put(`${prefix}/reviseRegular`, params)
}

/**
 * 添加固定车位
 * @param params 
 * @returns 
 */
export const addRegularRequest = (params: regularParams) => {
	return request.post(`${prefix}/addRegular`, params)
}